﻿// JScript 文件
Ext.onReady(function(){   
    Ext.BLANK_IMAGE_URL = "../JavaScript/Ext/resources/default/s.gif";
    Ext.QuickTips.init();    
    var item1 = Ext.create('Ext.Panel', {
        title: '查询终端',
        contentEl: 'queryMenu',
        iconCls:'query',
        allowBlank:true
    });     
    var item2 = Ext.create('Ext.Panel', {
        title: '我的查询',
        contentEl: 'myQueryMenu',
        iconCls:'home',
        allowBlank:true
    });
    var item3 = Ext.create('Ext.Panel', {
        title: '系统管理',
        contentEl: 'manageMenu',
        iconCls:'admin',
        allowBlank:true
    });
    Ext.create('Ext.container.Viewport', {
        layout: 'border',
        renderTo: Ext.getBody(),
        items: [{                    
            region: 'north',
            contentEl: 'header',
            height:40,
            border: false
        }, {
            region: 'west',
            collapsible: true,
            title: '主菜单区',      
            split: true,
            margins: '0 0 0 5',
            width: 160,
            layout: 'accordion',        
            //items: [item1,item2,item3]
            items: [item1,item3]
        }, {
            region: 'center',
            layout: 'fit',
            xtype: 'panel',
            margins: '0 5 0 0',
            items: {
                title: '<h6 id="contentTitle">欢迎</h6>',    
                border: false,      
                contentEl: 'content'         
            }
        }, {                    
            region: 'south',
            xtype: 'box',
            height: 5,
            border: false
        }]
    });    
    Ext.select('.menubar').each(function(i){
        i.on('mouseover',function(e,g){
            g.className = 'menubar menuover';
        });
        i.on('mouseout',function(e,g){        
            g.className = 'menubar';
        });
    });   
});
